package com.neusoft.neumooc.dao.front;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.neusoft.core.common.BaseDAO;
import com.neusoft.core.common.exception.DAOException;
import com.neusoft.neumooc.vo.ColumnsVO;
import com.neusoft.neumooc.vo.ContentVO;
import com.neusoft.neumooc.vo.SearchVO;
import com.neusoft.neumooc.vo.TypeVO;

/**
 * @ClassName: ContentmanageDaoImp
 * @Description: 内容管理逻辑处理类
 * @author HN
 * @date 2016年8月15日
 */
@Repository
public class ContentManageDAOImpl extends BaseDAO implements ContentManageDAO {

	/*
	 * 内容列表
	 */
	private static final String GET_CONTENT_LIST_SQL = "select *,if(status=1,'开放','停用') as statu from cw_contents where columnid=?";

	@Override
	public List<ContentVO> getContentList(String columnId, int pageIndex,
			int pageSize) throws DAOException {
		Object[] args = { columnId };
		return this.getPageData(GET_CONTENT_LIST_SQL, ContentVO.class,
				pageIndex, pageSize, args);
	}

}
